Update an object
To update an existing object, you can also use the Persist method:
employee.Birthdate = null; employee.Persist(); |
Notice that you can assign null here because Birthdate is of type Nullable<DateTime> as it can be NULL in the database.